<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Mei
  Date: 2022/3/22
  Time: 14:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <%@ include file="/pages/common/head_info.jsp" %>
    <link type="text/css" rel="stylesheet" href="static/css/index.css" >
    <link type="text/css" rel="stylesheet" href="static/css/head.css" >
</head>
<body>
<div class="head">
    <div class="logo">
        <h1><a href="pages/client/index.jsp">线上社区超市</a></h1>
    </div>
    <div class="search" style="visibility:hidden;">
        <input type="text" name="搜索" placeholder="搜索">
        <button>搜索</button>
    </div>
    <div>
        <c:if test="${empty sessionScope.userId}">
            <div class="userdata" style="width: 300px;margin-right: 250px;">
                <a href="pages/user/regist.jsp"><h3>注册</h3></a>
                <a href="pages/user/login.jsp"><h3>登录</h3></a>
            </div>
        </c:if>
        <c:if test="${not empty sessionScope.userId}">
            <div class="userdata" style="width: 400px;margin-right: 150px;">
                <a href="userServlet?action=logout"><h3 style="font-size: 10px;">注销</h3></a>
                <a href="orderServlet?action=showMyOrder"><h3 style="font-size: 10px;">我的订单</h3></a>
                <a href="pages/user/userdata.jsp"><h3 style="font-size: 10px;">个人信息</h3></a>
            </div>
        </c:if>
    </div>
</div>

<div class="userbox">
    <div class="userimgbox">
        <img src="static/img/user.jpg">
    </div>
    <div class="userdatabox">
        <div>
                    <p><strong>用户账号：</strong><span>${sessionScope.user.userCode}</span></p>
                    <p><strong>用户名称：</strong><span>${sessionScope.user.userName}</span></p>
                    <p><strong>用户性别：</strong><span><c:if test="${sessionScope.user.gender==1}">女</c:if><c:if test="${sessionScope.user.gender==2}">男
                    </c:if></span></p>
                    <p><strong>出生日期：</strong><span>${sessionScope.user.birthday}</span></p>
                    <p><strong>用户电话：</strong><span>${sessionScope.user.phone}</span></p>
                    <p><strong>用户地址：</strong><span>${sessionScope.user.address}</span></p>
        </div>
    </div>
</div>


</body>
</html>
